package kr.couponplay.android.domain.deal;

import java.util.ArrayList;
import java.util.List;


public class DealList {
	private List<Deal> deals;
	private int totalCount;
	private int mainCategoryId;
	private int subCategoryId;
	private String query;
	private int offset;
	
	public DealList(int totalCount, List<Deal> deals) {
		this.totalCount = totalCount;
		this.deals = deals;
	}
	
	public DealList(String query, List<Deal> deals) {
		this.query = query;
		this.deals = deals;
	}
	
	public void addDeals(List<Deal> newDeals) {
		if (deals == null) {
			this.deals = new ArrayList<Deal>();
		}
		this.deals.addAll(newDeals);
	}
	
	public int getSize() {
		if (deals == null) {
			return 0;
		}
		return deals.size();
	}	

	public List<Deal> getDeals() {
		return deals;
	}
	public void setDeals(List<Deal> sales) {
		this.deals = sales;
	}
	public int getTotalCount() {
		return totalCount;
	}
	public void setTotalCount(int totalCount) {
		this.totalCount = totalCount;
	}

	public int getMainCategoryId() {
		return mainCategoryId;
	}

	public void setMainCategoryId(int mainCategoryId) {
		this.mainCategoryId = mainCategoryId;
	}

	public int getSubCategoryId() {
		return subCategoryId;
	}

	public void setSubCategoryId(int subCategoryId) {
		this.subCategoryId = subCategoryId;
	}

	public String getQuery() {
		return query;
	}

	public void setQuery(String query) {
		this.query = query;
	}

	public int getOffset() {
		return offset;
	}

	public void setOffset(int offset) {
		this.offset = offset;
	}
}
